package com.kd.captcha;

import lombok.Getter;

@Getter
public class Captcha {

    /**
     * 业务标识
     */
    private final String biz;

    /**
     * 验证码缓存key
     */
    private final String name;

    /**
     * 验证码值
     */
    private final String value;

    public Captcha(String name, String value, String biz) {
        this.name = name;
        this.biz = biz;
        this.value = value;
    }

    public String getBiz() {
        return (this.biz != null && !this.biz.trim().isEmpty()) ? this.biz : "";
    }
}
